package com.shen.cloud.service;

import com.shen.cloud.dao.DepartmentDao;
import com.shen.cloud.pojo.Department;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService{
    @Autowired
    DepartmentDao departmentDao;

    public boolean insertDepartment(Department department) {
        return departmentDao.insertDepartment(department);
    }

    public Department selectDepartmentById(Long id) {
        return departmentDao.selectDepartmentById(id);
    }

    public List<Department> selectAllDepartment() {
        return departmentDao.selectAllDepartment();
    }
}
